function colch=choose_col(x); 
% ===============================
% CHOOSE_COL 
% Pass matrix X 
% Choose a column 
% Output: COLCH is a column indicator 
% 
% Zero is allowed as an input 
% AJ October 22 2006 
% ====================================
tempnum=size(x,2);
disp(' ');
disp(['Number of columns available :',num2str(tempnum)]);
tecc=0;
while tecc < 1;
    colch=inputdlg({'Enter which column wish to use'},'Chose a column to use',1);
    colch=str2num(colch{:});
    if (colch <= tempnum) & (colch >=0 ); 
        tecc=1;
    end
end
disp(['Column chosen: ',num2str(colch)]);